﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace QuanLyHoSoBenhNhan
{
    public partial class _default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }


        protected void btnTimKiem_Click(object sender, EventArgs e)
        {
            ServiceReference1.ServiceQLHSBNSoapClient ser = new ServiceReference1.ServiceQLHSBNSoapClient();

            if (string.IsNullOrEmpty(txtDiaChi.Text))
            {
                GridView1.DataSource = ser.TimKiemBenhNhan(txtHoTen.Text, "");
            }
            else
            {
                GridView1.DataSource = ser.TimKiemBenhNhan(txtHoTen.Text, txtDiaChi.Text);
            }

            GridView1.DataBind();
        }


        protected void btnChiTiet_Command1(object sender, CommandEventArgs e)
        {
            Response.Redirect("~/details.aspx?ID=" + e.CommandArgument);
        }

       

    }
}